/**
 * Created by mango.xu on 2017/9/11 0001.
 */
import Vue from 'vue'
import Vuex from 'vuex'

import ApiService from './ApiService'
//import UserService from './userService'

Vue.use(Vuex)

export default new Vuex.Store({
  	state:{
		userName:null
	},
	actions:{
		user_login ({ commit }, name){
			commit('USER_LOGIN', name);
		}	
	},
	mutations:{
		USER_LOGIN (state, name) {
//			state.user.name = name;
//			state.user.status = true;
			state.userName = name;
		}
	},
  modules: {
    ApiService,
    //UserService
  }
})